# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libice
pkgver=1.0.10
pkgrel=0
pkgdesc="X11 Inter-Client Exchange library"
url="http://xorg.freedesktop.org/"
arch="all"
license="X11"
makedepends="xorgproto xtrans util-macros xmlto check-dev
	autoconf automake libtool"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://www.x.org/releases/individual/lib/libICE-$pkgver.tar.bz2"
builddir="$srcdir/libICE-$pkgver"

# secfixes:
#   1.0.10-r0:
#     - CVE-2017-2626

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-ipv6 \
		--enable-docs \
		--with-xmlto \
		--without-fop
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="2f1ef2c32c833c71894a08fa7e7ed53f301f6c7bd22485d71c12884d8e8b36b99f362ec886349dcc84d08edc81c8b2cea035320831d64974edeba021b433c468  libICE-1.0.10.tar.bz2"
